<template>
	<view class="e-flex e-m-b-40" @tap="$goTo('/pages/information/info', { id: info.id })" >
		<load-image mode="aspectFill" :size="['238rpx', '134rpx']" :src="thumbnailPic[0]"></load-image>
		<view class="e-m-l-30">
			<view class="e-line-2 e-line-h-42 e-m-b-18" style="height: 80rpx">
				<span class="w-500">{{ info.title }}</span>
			</view>
			<view>
				<span class="e-font-24 e-p-r-16 c-secondary">{{ info.authorName }}</span>
				<span class="e-font-24 c-secondary">{{ info.views || 0 }}{{ $t('layout.阅读') }}</span>
			</view>
		</view>
	</view>
</template>

<script setup lang="ts">
	import {computed} from 'vue'
	import type { InformationItem } from '@/common/request/api';
	const props = defineProps<{
		info:InformationItem
	}>()
	
	const thumbnailPic = computed(() => {
		return props.info.thumbnailPic?.split?.(',') || []
	})
	
</script>

<style>
</style>